/*
 * @Author: 刘润泽
 * @Date: 2023-02-03 19:28:15
 * @LastEditors: 刘润泽
 * @LastEditTime: 2023-02-03 19:30:07
 * @Description: 
 */
package server.business.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import server.business.pojo.OverallBlood;
import server.business.service.OverallBloodService;
import server.business.utils.results.lrz.Result;

@RestController
@RequestMapping("/overall")
public class OverallBloodController {

    @Autowired
    OverallBloodService overallBloodService;

    /**
     * 更改整体血液信息表状态
     * 
     * @param bloodInformation
     * @return
     */
    @RequestMapping(value = "/normal/setOverallBloodState", method = RequestMethod.PUT)
    public Result setBloodState(@RequestBody OverallBlood overallBlood) {
        // 更改整体输血信息表中的血液状态
        overallBloodService.setStateByTransfusionNumber(overallBlood.getTransfusionNumber(), overallBlood.getState());
        return Result.success("整体输血信息表状态更改完毕");
    }
}
